package team.seekers.hula.question.question.entity.dao;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import team.seekers.hula.common.entity.enums.StatusEnum;

/**
 * <p>
 * 一个问题，或者说一个讨论
 * </p>
 *
 * @author hbc
 * @since 2021-02-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Question对象", description="一个问题，或者说一个讨论")
@TableName(value = "question")
public class QuestionDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "问题标题")
    private String title;

    @ApiModelProperty(value = "背景描述")
    private String context;

    @ApiModelProperty(value = "是否加精")
    @JsonValue
    private Integer isSpecial;

    @ApiModelProperty(value = "是否为热点")
    @JsonValue
    private Integer isHot;

    @ApiModelProperty(value = "提出这个问题的人的id")
    private String userId;

    @ApiModelProperty(value = "专业提问，辅导者的id")
    private String teamId;

    @ApiModelProperty(value = "问题的热度")
    private String heat;

    @ApiModelProperty(value = "热点问题的封面")
    private String cover;

    @ApiModelProperty(value = "问题分到的hula币")
    private Double hulaCoin;

    @ApiModelProperty(value = "问题分到的hula积分")
    private Double hulaScore;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "可见性，0为不可见，1为关注可见，2为全网可见")
    private Integer visibility;

    @ApiModelProperty(value = "0为待审核，1为审核通过，2为审核不通过")
    @JsonValue
    private StatusEnum status;

}
